var mysql = require('mysql');

//创建一个connection
var pool = mysql.createPool({
	host : 'localhost',
	user : 'root',
	password :'root',
	port : '3306',
	database: 'nodemysql',
});

pool.getConnection(function(err,connection){
	
	connection.query('select * from userinfo;',function(err,result){
		console.log(result);
		connection.release();
	});

	connection.query('select * from userinfo;',function(err,result){
		console.log(result);
		connection.release();
	});	
});




